package com.aaa.hospital.ManagementEnd.mapper;

import com.aaa.hospital.ManagementEnd.pojo.Docuser;
import com.aaa.hospital.ManagementEnd.pojo.Medicine;
import com.aaa.hospital.ManagementEnd.util.MedicineVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface MedicineMapper {
    List<Medicine> queryAll();
    int update(Medicine medicine);
    List<Docuser> select_ypId_ypName(@Param("ypid") Integer ypid, @Param("ypname") String ypname);
    int delete(int ypid);
    int insert(Medicine medicine);
    int updateKC(@Param("ypid")Integer ypid,@Param("jnum") Integer jnum);

    //lgq
    List<Medicine> queryById(Integer yfid);
    boolean upnum (@Param("ypid") Integer ypid,@Param("ypnum") Integer ypnum);
    MedicineVo selectById(Integer ypid);

    //11/8/lgq //单条数据查询
    Medicine ByYpId(Integer ypid);
}
